package data;

/**. Adds an unique hardcoded admin to the program
 * @author Matthias
 * 
 */
public class Admin extends User {

	/**. Admin constructor
	 * @param bankDatabase
	 */
	public Admin(final BankDatabase bankDatabase) {
		// Calls superclass constructor with hardcoded data
		super(1234, 4321, "Mads", "Nyborg", "45255280", 
			"DTU, Bygning 303B", "rum 046", "2800", "Kgs. Lyngby"); 
		bankDatabase.getUserList().add(this); // adds admin to the userlist
		this.toAdmin = true; // sets user to admin
	}

	/**. Checks admin if admin pin matches
	 * @see data.User#validatePIN(int)
	 * 
	 */
	@Override
	public final boolean validatePIN(final int userPIN){
		return userPIN == this.getPIN(); 
	}
	
} // end class